<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>系统参数设置</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="__STATIC__/lay/lib/layui-v2.5.5/css/layui.css" media="all">
    <link rel="stylesheet" href="__STATIC__/lay/css/public.css" media="all">
</head>

<body>
    <div class="layuimini-container">
        <div class="layuimini-main">



            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                <legend>系统参数设置</legend>
            </fieldset>

            <form class="layui-form">


                <div class="layui-form-item">
                    <label class="layui-form-label">后台名称</label>
                    <div class="layui-input-block">
                        <input type="text" name="ADMIN_NAME" 
                            value="{$list['ADMIN_NAME']}" placeholder="后台名称" lay-verify="required"
                            lay-reqtext="后台名称不能为空" class="layui-input">

                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit="" lay-filter="demo1">保存</button>
                    </div>
                </div>
            </form>


        </div>
    </div>

    <script src="__STATIC__/lay/lib/layui-v2.5.5/layui.js" charset="utf-8"></script>
    <script src="__STATIC__/lay/js/jquery-2.1.0.min.js" charset="utf-8"></script>
    <!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
    <script style="text/javascript">
        layui.use(['form', 'layedit', 'laydate', 'upload'], function () {
            var form = layui.form,
                layer = layui.layer,
                layedit = layui.layedit,
                laydate = layui.laydate,
                upload = layui.upload;
            var $ = layui.jquery;


            //监听提交
            form.on('submit(demo1)', function (data) {


                $.ajax({
                    type: "post",
                    url: "{:url('system/update_parameter')}",
                    data: data.field,
                    dataType: "json",
                    success: function (res) {
                        if (res.code == 1) {
                            layer.msg('保存成功');

                        } else {
                            return layer.msg('保存失败');
                        }
                    }
                });
                return false;
            });

        });
    </script>


</body>

</html>